import { ElementDSL } from '../ElementDSL'
import type { SizeType, ButtonGroupType } from '../DslType'
import { ElButtonGroup } from 'element-plus'
//按钮
class ButtonGroup extends ElementDSL {
  constructor() {
    super(ElButtonGroup)
  }
  /**
   * 按钮尺寸
   */
  size(value: SizeType): this {
    return super.setProps('size', value)
  }
  /**
   * 按钮类型
   */
  type(value: ButtonGroupType): this {
    return super.setProps('type', value)
  }
  /**
   * 插槽
   * */
  slot(content: string): this {
    return super.setSlot('default', content)
  }
}

export const buttonGroup = () => new ButtonGroup()
